﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DAL;
using HomeStayWebCP.Models.BusinessObject;

namespace HomeStayWebCP.Models
{
    public class LikeModel
    {
        LikesDataModel model = new LikesDataModel();
        public bool CheckCurrentUserLikePost(string username, int postID)
        {
            bool result = false;
            result = model.CheckUserLikePost(username, postID);
            return result;
        }
        public int CountLikeOfPost(int postID)
        {
            LikesDataModel model = new LikesDataModel();
            int result = 0;
            result = model.CountLikeOfPost(postID);
            return result;
        }

        #region Hoangdx Code LikeModel
        public bool InsertLikes(int postID, string username)
        {
            model.InsertLikePosts(postID, username);
            return true;
        }
        #endregion
    }
}